<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="decorator" content="default" />
<title>工程管理</title>
<script type="text/javascript">
	$(document).ready(
			function() {
				$("#value").focus();
				$("#inputForm")
						.validate(
								{
									submitHandler : function(form) {
										loading('正在提交，请稍等...');
										form.submit();
									},
									errorContainer : "#messageBox",
									errorPlacement : function(error, element) {
										$("#messageBox").text("输入有误，请先更正。");
										if (element.is(":checkbox")
												|| element.is(":radio")
												|| element.parent().is(
														".input-append")) {
											error.appendTo(element.parent()
													.parent());
										} else {
											error.insertAfter(element);
										}
									}
								});
			});
</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/project/project/">工程列表</a></li>
		<li class="active">
		<a href="${ctx}/project/project/form?id=${project.id}">
			工程添加
		</a></li>
	</ul>
	<form:form id="inputForm" modelAttribute="project"
		action="${ctx}/project/project/save" method="post" class="form-horizontal">
		<form:hidden path="id" />
		<common:message content="${message}" />
		<div class="control-group">
			<label class="control-label">委托单位:</label>
			<div class="controls">
				<form:input path="client" htmlEscape="false" maxlength="50"
					class="required" />
					<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">工程名称:</label>
			<div class="controls">
				<form:input path="name" htmlEscape="false" maxlength="50"
					class="required" />
					<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">缩写:</label>
			<div class="controls">
				<form:input path="suoxie" htmlEscape="false" maxlength="50"
					class="required" />
					<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">承压设备类别:</label>
			<div class="controls">
				<form:select path="cysblb" class="input-medium">
					<form:option value="" label="请选择"/>
					<form:options items="${fns:getDictList('dict_cysblb')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
				</form:select>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">监理单位:</label>
			<div class="controls">
				<form:input path="jldw" htmlEscape="false" maxlength="50"
					class="" />
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">施工单位:</label>
			<div class="controls">
				<form:input path="sgdw" htmlEscape="false" maxlength="50"
					class="required" />
					<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">检测负责人:</label>
			<div class="controls">
				<form:input path="fzr" htmlEscape="false" maxlength="50"
					class="required" />
					<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">检测项目:</label>
			<div class="controls">
				<form:checkboxes items="${fns:getDictList('dict_jcxm')}" path="jcxmList" itemLabel="label" itemValue="value"/>
			<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">备注:</label>
			<div class="controls">
				<form:textarea path="remarks" htmlEscape="false" rows="3"
					maxlength="200" class="input-xlarge" />
			</div>
		</div>
		<div class="form-actions">
			<input id="btnSubmit" class="btn btn-primary" type="submit"
				value="保 存" />&nbsp; 
				<input id="btnCancel" class="btn" type="button"
				value="返 回" onclick="history.go(-1)" />
		</div>
	</form:form>
</body>
</html>